import request from '@/utils/request'

// 查询汇兑用户列表
export function getExhUserList(query) {
  return request({
    url: '/md/exchange/list',
    method: 'get',
    params: query
  })
}

// 查询汇兑用户详细
export function exhUserDetail(exchangeId) {
  return request({
    url: '/md/exchange/' + exchangeId,
    method: 'get'
  })
}

// 新增汇兑用户
export function addExhUser(data) {
  return request({
    url: '/md/exchange',
    method: 'post',
    data: data
  })
}

// 修改汇兑用户
export function updateExhUser(data) {
  return request({
    url: '/md/exchange',
    method: 'put',
    data: data
  })
}

// 删除汇兑用户
export function delExhUser(exchangeId) {
  return request({
    url: '/md/exchange/' + exchangeId,
    method: 'delete'
  })
}

// 修改汇兑用户状态
export function changeExhUserStatus(data) {
  return request({
    url: '/md/exchange/updateStatus',
    method: 'put',
    data: data
  })
}